# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=evolution-ews
pkgver=3.36.5
pkgrel=0
pkgdesc="MS Exchange integration through Exchange Web Services"
url="https://wiki.gnome.org/Apps/Evolution/EWS"
arch="all !s390x !mips64" # missing evolution on s390x and mips64
license="LGPL-2.1-or-later"
depends="evolution"
makedepends="cmake gtk-doc intltool glib-dev gettext-dev evolution-data-server-dev
	evolution-dev libmspack-dev uhttpmock-dev"
options="!check" # fail in docker due to port restrictions
subpackages="$pkgname-lang"
source="https://download.gnome.org/sources/evolution-ews/${pkgver%.*}/evolution-ews-$pkgver.tar.xz"

build() {
	mkdir -p "$builddir"/build
	cd "$builddir"/build
	cmake \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_BUILD_TYPE=None \
		-DENABLE_TESTS=TRUE \
		..
	make
}

check() {
	make -C build test
}

package() {
	make -C build DESTDIR="$pkgdir" install
}

sha512sums="9cc40ae5d56bc86a8aa4e7aaa36fa10b0841278dd1edb075155bfe3666da4051e4fc4843398f74d00d77f550aaeb93bf576007828da4c574a17d4f17c41bfb7f  evolution-ews-3.36.5.tar.xz"
